use[MoneyManager]

-- users --

go
SET IDENTITY_INSERT dbo.Users ON
go
insert into Users(UserId, Username, Password, Email, FirstName, LastName) 
		values(1, N'Administrator', N'e10adc3949ba59abbe56e057f20f883e', N'txhong@gmail.com', N'hong', N'tran')
go	
SET IDENTITY_INSERT dbo.Users OFF

-- roles --

go
SET IDENTITY_INSERT dbo.Roles ON
go
insert into Roles(RoleId, Name, Description) values(1, N'Administrator', N'Administrator')
go
insert into Roles(RoleId, Name, Description) values(2, N'User', N'User')	
go
SET IDENTITY_INSERT dbo.Roles OFF

-- user in roles --

go
insert into UserInRoles(RoleId, UserId) values(1, 1)

-- refs --

go
SET IDENTITY_INSERT dbo.Refs ON
go
insert into Refs(RefId, Name, Description) values (1, N'ATM', N'ATM')
go
insert into Refs(RefId, Name, Description) values (2, N'CHECK', N'CHECK')
go
insert into Refs(RefId, Name, Description) values (3, N'DEP', N'DEP')
go
insert into Refs(RefId, Name, Description) values (4, N'EFT', N'EFT')
go
insert into Refs(RefId, Name, Description) values (5, N'TXFR', N'TXFR')
go
SET IDENTITY_INSERT dbo.Refs OFF

-- currencies --
go
SET IDENTITY_INSERT dbo.Currencies ON
go
insert into Currencies(Id, Name, Description, Rate) values(1, N'USD', N'USD', 0)
go
insert into Currencies(Id, Name, Description, Rate) values(2, N'VND', N'VND', 0)
go
insert into Currencies(Id, Name, Description, Rate) values(3, N'EUR', N'EUR', 0)
go
SET IDENTITY_INSERT dbo.Currencies OFF

-- Classes --

go
SET IDENTITY_INSERT dbo.Classes ON
go
insert into Classes(Id, Name) values(1, N'Default')
go
insert into Classes(Id, Name) values(2, N'Personal')
go
insert into Classes(Id, Name) values(3, N'Business')
go
SET IDENTITY_INSERT dbo.Classes OFF

-- Account Types --

go
SET IDENTITY_INSERT dbo.AccountTypes ON
go
insert into AccountTypes(Id, Name) values(1, N'Asset')
go
insert into AccountTypes(Id, Name) values(2, N'Cash')
go
insert into AccountTypes(Id, Name) values(3, N'Checking')
go
insert into AccountTypes(Id, Name) values(4, N'Credit Card')
go
insert into AccountTypes(Id, Name) values(5, N'Debit Card')
go
insert into AccountTypes(Id, Name) values(6, N'Liabilities')
go
insert into AccountTypes(Id, Name) values(7, N'Line Of Credit')
go
insert into AccountTypes(Id, Name) values(8, N'Saving')
go
SET IDENTITY_INSERT dbo.AccountTypes OFF

-- Accounts

go
SET IDENTITY_INSERT dbo.Accounts ON
go
insert into Accounts(AccountId, UserId, DisplayName, CurrencyType, AccountType, InitBalance, Description,					ContactName, ContactPhone, CreationDate)
values(1, 1, N'Hong Tran Xuan', 1, 1, 1000, N'', N'Hong Tran Xuan', N'123456789', GETDATE())

go
SET IDENTITY_INSERT dbo.Accounts OFF

-- Categories --

go
SET IDENTITY_INSERT dbo.Categories ON
go
insert into Categories(Id, Name) values(1, N'Income')
go
insert into Categories(Id, Name) values(2, N'Expenses')
go
insert into Categories(Id, Name, ParentId) values(3, N'Capital Gain', 1)
go
insert into Categories(Id, Name, ParentId) values(4, N'Dividend', 1)
go
insert into Categories(Id, Name, ParentId) values(5, N'Employment', 1)
go
insert into Categories(Id, Name, ParentId) values(6, N'Interest', 1)
go
insert into Categories(Id, Name, ParentId) values(7, N'Investment', 1)
go
insert into Categories(Id, Name, ParentId) values(8, N'Other Income', 1)
go
insert into Categories(Id, Name, ParentId) values(9, N'Rental Income', 1)
go
insert into Categories(Id, Name, ParentId) values(10, N'Spouses Income', 1)
go
insert into Categories(Id, Name, ParentId) values(11, N'Bank charges and fees', 2)
go
insert into Categories(Id, Name, ParentId) values(12, N'Childcare', 2)
go
insert into Categories(Id, Name, ParentId) values(13, N'Clothing', 2)
go
insert into Categories(Id, Name, ParentId) values(14, N'Dining', 2)
go
insert into Categories(Id, Name, ParentId) values(15, N'Education', 2)
go
insert into Categories(Id, Name, ParentId) values(16, N'Entertainment', 2)
go
insert into Categories(Id, Name, ParentId) values(17, N'Films', 2)
go
insert into Categories(Id, Name, ParentId) values(18, N'Fixed Line', 2)
go
insert into Categories(Id, Name, ParentId) values(19, N'Gas & Electricity', 2)
go
insert into Categories(Id, Name, ParentId) values(20, N'Gifts', 2)
go
insert into Categories(Id, Name, ParentId) values(21, N'Groceries', 2)
go
insert into Categories(Id, Name, ParentId) values(22, N'Home Repair', 2)
go
insert into Categories(Id, Name, ParentId) values(23, N'Housing', 2)
go
insert into Categories(Id, Name, ParentId) values(24, N'Insurance', 2)
go
insert into Categories(Id, Name, ParentId) values(25, N'Interest Paid', 2)
go
insert into Categories(Id, Name, ParentId) values(26, N'Miscellaneous', 2)
go
insert into Categories(Id, Name, ParentId) values(27, N'Mobile phone', 2)
go
insert into Categories(Id, Name, ParentId) values(28, N'Motor Service', 2)
go
insert into Categories(Id, Name, ParentId) values(29, N'Motor Venhicle', 2)
go
insert into Categories(Id, Name, ParentId) values(30, N'Other Expenses', 2)
go
insert into Categories(Id, Name, ParentId) values(31, N'Petrol', 2)
go
insert into Categories(Id, Name, ParentId) values(32, N'Recreation', 2)
go
insert into Categories(Id, Name, ParentId) values(33, N'Rental', 2)
go
insert into Categories(Id, Name, ParentId) values(34, N'Subscription', 2)
go
insert into Categories(Id, Name, ParentId) values(35, N'Telephone', 2)
go
insert into Categories(Id, Name, ParentId) values(36, N'Travel', 2)
go
insert into Categories(Id, Name, ParentId) values(37, N'Utilities', 2)
go
insert into Categories(Id, Name, ParentId) values(38, N'Water', 2)
go
insert into Categories(Id, Name, ParentId) values(39, N'Work related', 2)
go
SET IDENTITY_INSERT dbo.Categories OFF

-- Settings --
go
SET IDENTITY_INSERT dbo.Settings ON
go
insert into Settings(SettingId, [Key]) values(1, N'Default Account')
go
insert into Settings(SettingId, [Key]) values(2, N'Home Currency')
go
SET IDENTITY_INSERT dbo.Settings OFF